 const SYSTEM_INFO = uni.getSystemInfoSync(); //
 export const getstatusBarHeight = () => SYSTEM_INFO.statusBarHeight || 15; // 获取系统设备头部高度


export const getTitleBarHeight = () => {
    if (uni.getMenuButtonBoundingClientRect) {
         const { top, height } = uni.getMenuButtonBoundingClientRect(); // 获取胶囊按钮的状态
         return height + (top - getstatusBarHeight()) * 2;
    } else {
      return 40;
    }
};


export const GetNavBarHeight = () => getstatusBarHeight() + getTitleBarHeight();
